#include <string>
#include <iostream>
using namespace std;

const int intN_width = 65536;

class intN {
	private :
		bool _body[intN_width];
		bool& operator[](int index);
		int _div2(string& str);
	public :
		intN();
		intN(unsigned long long num);
		void read(string str);
		string toBits();
		string toDigits();
		intN operator=(unsigned long long num);
		intN operator&(const intN& b);
		intN operator|(const intN& b);
		intN operator^(const intN& b);
		intN operator~();
		intN operator<<(int n);
		intN operator>>(int n);
		bool operator>(const intN& b);
		bool operator<(const intN& b);
		bool operator!=(const intN& b);
		bool operator==(const intN& b);
		bool operator>=(const intN& b);
		bool operator<=(const intN& b);
		intN operator+(const intN& b);
		intN operator-(const intN& b);
};

